Skip to content

Conversation

@hoyadong1
Copy link
Collaborator

@hoyadong1 hoyadong1 commented Jan 2, 2026

📝 변경 사항

Naver Cloud Platform의 Object Storage를 활용한 장소 이미지 업로드 기능을 구현했습니다. AWS S3 호환 API를 사용하여 파일을 저장하고 URL을 반환하는 백엔드 시스템을 개발했습니다.

🎯 작업 내용

  • Naver Object Storage 연동을 위한 S3Client 설정 구성 (StorageConfig)
  • 파일 업로드 API 엔드포인트 구현 (POST /api/s3/upload/place)
  • 이미지 파일 검증 로직 추가 (빈 파일 체크, 확장자 추출)
  • UUID 기반 고유 파일명 생성으로 중복 방지
  • 업로드된 파일의 공개 URL 반환 기능
  • Storage 연결 상태 확인 헬스체크 엔드포인트 추가
  • 환경변수 설정을 위한 .env 파일 템플릿 업데이트
  • AWS SDK for Java v2 의존성 추가 (s3, auth 모듈)
  • .gitignore에 민감정보 파일 추가 (google-services.json, .env)

🔗 관련 이슈

Closes #57

📸 스크린샷 (선택사항)

💬 리뷰어에게

  • Naver Object Storage의 엔드포인트와 리전 설정이 application.yml에 하드코딩되어 있습니다
  • 현재는 장소 이미지만 업로드 가능하며, dir 파라미터로 디렉토리를 구분하고 있습니다

@hoyadong1 hoyadong1 self-assigned this Jan 2, 2026
@hoyadong1 hoyadong1 added the feature 기능 추가, ui 변경 label Jan 2, 2026
@hoyadong1 hoyadong1 linked an issue Jan 2, 2026 that may be closed by this pull request
@hoyadong1 hoyadong1 changed the title [Feature] 장소 이미지 추가를 위한 작업 [WIP] [Feature] 장소 이미지 추가를 위한 작업 Jan 2, 2026
@hoyadong1 hoyadong1 changed the title [WIP] [Feature] 장소 이미지 추가를 위한 작업 [WIP] [Feature] 장소 이미지 추가 Jan 2, 2026
@HJunng HJunng added this to the 백엔드 공통작업 milestone Jan 2, 2026
@uselessnaming
Copy link
Collaborator

내용을 보면 naver api 연결 및 retrofit 설정해두신 것 같은데 임의 PR인가요?

@hoyadong1
Copy link
Collaborator Author

내용을 보면 naver api 연결 및 retrofit 설정해두신 것 같은데 임의 PR인가요?

넵 아직 작업중입니당

@hoyadong1 hoyadong1 changed the title [WIP] [Feature] 장소 이미지 추가 [Feature] 장소 이미지 업로드 Jan 5, 2026
Copy link
Collaborator

@uselessnaming uselessnaming left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

서버에서 이미지 저장하기 위해서 naver storage 연결한 거라고 이해하면 될까요?
그리고 서버에 이미지 관련해서 저장할 때 조심해야 하는 것이나 따로 해야 하는 작업이 있나요?
잘 몰라서 여쭤봅니다!

Copy link
Collaborator

@HJunng HJunng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

파일 업로드 용량 제한을 걸어둬도 좋을 것 같습니다~

@hoyadong1
Copy link
Collaborator Author

서버에서 이미지 저장하기 위해서 naver storage 연결한 거라고 이해하면 될까요? 그리고 서버에 이미지 관련해서 저장할 때 조심해야 하는 것이나 따로 해야 하는 작업이 있나요? 잘 몰라서 여쭤봅니다!

네, 서버에 이미지를 직접 저장하지 않고 Naver Object Storage에 저장하려고 연결한 거라고 보면 됩니다.
서버는 파일을 들고 있지 않고 이미지 URL만 관리하는 구조입니다.
참조가 없는(url을 db에서 관리하고 있지 않은) 이미지가 생기지 않도록 저장하는 게 중요할 거 같습니다

Copy link
Collaborator

@GwonDongHyeon21 GwonDongHyeon21 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Storage 추가하신거 확인했습니다. 고생하셨습니다!

@hoyadong1 hoyadong1 requested a review from HJunng January 5, 2026 09:02
Copy link
Collaborator

@HJunng HJunng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

고생하셨습니다~

@hoyadong1 hoyadong1 merged commit c3022c3 into dev Jan 5, 2026
@hoyadong1 hoyadong1 deleted the feature/57-place-image-backend branch January 5, 2026 09:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature 기능 추가, ui 변경

Projects

None yet

Development

Successfully merging this pull request may close these issues.

이미지 추가 기능 (서버)

5 participants